package com.frost.demo.ioc.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/prop")
@RestController
public class PropertiesController {
    @Value("${frost.key1}")
    private String key1;

    @RequestMapping("/readValue")
    public String readValue() {
        return "从 properties 读取配置文件, key: " + key1;
    }
}
